﻿using J.Status.Application.Command.BookingCommand;
using J.StatusModel;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.BookingHandler
{
    public class Booking2SelectHandler:IRequestHandler<Booking2SelectCommand, List<BookingModel>>
    {
        private readonly IBookingService bookingService;
    public Booking2SelectHandler(IBookingService bookingService)
    {
        this.bookingService = bookingService;
    }

    public async Task<List<BookingModel>> Handle(Booking2SelectCommand request, CancellationToken cancellationToken)
    {
        return await bookingService.NewPeopleShow();
    }
}
}
